{echo:JS::import('form');}
{echo:JS::import('editor');}
{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
<h1 class="page_title">{$name}</h1>
<form class="mt10" action="{url:/admin/class_config_save}" method="post" callback="check_invalid" >
  {if:isset($class_name)}
  <input type="hidden" name="class_name" value="{$class_name}">
  {/if}
  <div class="form2">
    {set:$config_from = call_user_func(array("$class_name","config"));}
      {list:items=$config_from}
        <dl class="lineD">
          <dt><b class="red">*</b>{$item['caption']}：</dt>
          <dd>
            <input class="normal" name="{$item['field']}" pattern="required" type="text" value="" />
          </dd>
        </dl>
      {/list}
        <dl class="lineD">
          <dt><b class="red">*</b>是否开启：</dt>
          <dd>
            <label class='attr'><input name="status" type="radio" value="1" checked="checked" />开启</label>
            <label class='attr'><input name="status" type="radio" value="0" />关闭</label>
            <label></label>
          </dd>
        </dl>
        <div style="text-align:center;margin-top:20px;">
  <input type="submit" class="focus_button" value="提交">
  &nbsp;&nbsp;&nbsp;&nbsp;
  <input type="reset" value="重置" class="button"></div>
  </div>
</form>

<script language="javascript">
//DOM加载完毕
$(function(){
    var form = new Form();
    {if:$config}
    {list:items=unserialize($config)}
    form.setValue("{$key}","{$item}");
    {/list}
    {/if}
    form.setValue("status","{$status}");
});
</script>
